package com.example.preventlosing;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {

	
	public Button registerBtn;
	public Button settingBtn;
	public Button searchBtn;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		registerBtn = (Button)findViewById(R.id.mainRegisterButton);
		settingBtn = (Button)findViewById(R.id.mainSettingButton);
		searchBtn = (Button)findViewById(R.id.mainSearchButton);
		
	}
	
	public void mOnClick(View v) {
		switch (v.getId()) {
		case R.id.mainRegisterButton:
			Intent intent1 = new Intent(this, RegisterActivity.class);
			startActivity(intent1);
			break;
		case R.id.mainSettingButton:
			Intent intent2 = new Intent(this, SettingActivity.class);
			startActivity(intent2);
			break;
		case R.id.mainSearchButton:
			Intent intent3 = new Intent(this, SearchLoginActivity.class);
			startActivity(intent3);
			break;
		 
		}
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds i tems to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
